/**
* Created by meizhao on 2020-03-28.
*/

<template>
  <div>
    <van-nav-bar
      title="待办事务"
      left-text=""
      left-arrow
      @click-left="onClickLeft"
    />
    <div class="drea" v-for="(item,index) in drafts.result">
      <div class="draf_left">
          <span class="title">
            {{item.taskName}}
          </span>
        <p class="time">最后修改时间:{{item.createTime}}</p>
      </div>
      <div class="draf_right">
        <img src="../../../assets/right.png">
      </div>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  import { getUserAllTask } from '../../../api/index.js'
  export default {
    data() {
      return {
        drafts:''
      }
    },
    methods:{
      onClickLeft(){
        this.$router.push({path:'../Message'})
      },
      //数据
      async draft() {
        let msg = await getUserAllTask()
        this.drafts = msg.data
      },
    },
    mounted(){
      this.draft()
    },
  };
</script>

<style>
  body {
    width: 100%;
    height: 100%;
    position: relative;
    background: #ebebeb
  }
</style>
<style lang="stylus" rel="stylesheet/stylus" scoped>
  .drea
    display flex
    font-size 30px
    margin 30px
    padding:40px
    background #ffffff
    border-radius 20px
    .draf_left
      flex 8
      .title
        font-weight 600
        font-size 32px
      .time
        font-size 26px
        padding-top 20px
        color: #9E9E9E
    .draf_right
      margin-top 20px
      img
        width 13px
        height:24px

</style>
